
function Save_TuVanChoVay_Click()
{
    
    
    var cboNganHangID= document.getElementById("cboNganHangID").value;
 
    
    var cboLoai= document.getElementById("cboLoai").value;
    
    var txtDienGiai= document.getElementById("txtDienGiai").value;
    
   
    
    var txtLaiXuat= document.getElementById("txtLaiXuat").value;
    var txtPTThanhToanTruoc= document.getElementById("txtPTThanhToanTruoc").value;
    //var txtEmail= document.getElementById("txtEmail").value;
    
    
   
    

    Save_TuVanChoVay([{name: 'NganHangID', value: '' + cboNganHangID + ''}
            ,{name: 'DienGiai', value: '' + txtDienGiai + ''}
            ,{name: 'Loai', value: '' + cboLoai + ''}
            ,{name: 'LaiXuat', value: '' + txtLaiXuat + ''}
            ,{name: 'PTThanhToanTruoc', value: '' + txtPTThanhToanTruoc + ''}
        ]);
      
        
}
function Delete_tuvanchovay_Click(tuvanid,msg)
{
    var x=confirm(msg);
    if(x===true)
        {
            Delete_tuvanchovay([{name: 'ID', value: '' + tuvanid + ''}]);
        }
}
function Update_tuvanchovay_Click(tuvanid)
{
   
    Update_tuvanchovay([{name: 'ID', value: '' + tuvanid + ''}]);
}

function cboNganHangID_changed()
{
   var cboNganHangID= document.getElementById("cboNganHangID").value;
    select_tuvanchovay([{name: 'ID', value: '' + cboNganHangID + ''}]);
}



function Save_Comment_Click()
{
   var txtCommentText= document.getElementById("txtCommentText").value;
   cmdSave_Comment([{name: 'CommentText', value: '' + txtCommentText + ''}]);
}








//var onclickUploadfile=function(key){
//    
//    //cmdSetParamUploadFile([{name: 'HinhAnhID', value: '' + key + ''}]);  
//    $('.custom-input-group .ui-fileupload-choose input').click();
//};

function Delete_Blog_Click(blogid,msg)
{
    var x=confirm(msg);
    if(x===true)
        {
            Delete_Blog([{name: 'ID', value: '' + blogid + ''}]);
        }
}
function Update_Blog_Click(blogid)
{
   
    Update_Blog([{name: 'ID', value: '' + blogid + ''}]);
}
function Save_Blog_Click()
{
    
    
//    var txtTieuDe= document.getElementById("txtTieuDe").value;
// 
//    
//    var txtTomTat= CKEDITOR.instances['txtTomTat'].getData();
//    
//    var txtNoiDung= CKEDITOR.instances['txtNoiDung'].getData();
//    
//    var txtTrangThai="0";
//
//    Save_Blog([
//            {name: 'TieuDe', value: '' + txtTieuDe + ''}
//            ,{name: 'TomTat', value: '' + txtTomTat + ''}
//            ,{name: 'NoiDung', value: '' + txtNoiDung + ''}
//            ,{name: 'TrangThai', value: '' + txtTrangThai + ''}
//        ]);
      Save_Blog();
        
}
function New_Blog_Click()
{
   New_Blog();
}



function Delete_HangXe_Click(blogid,msg)
{
    var x=confirm(msg);
    if(x===true)
        {
            Delete_HangXe([{name: 'ID', value: '' + blogid + ''}]);
        }
}
function Update_HangXe_Click(blogid)
{
   
   
    Update_HangXe([{name: 'ID', value: '' + blogid + ''}]);
}
function Save_HangXe_Click()
{
    
    
    var txtTenHang= document.getElementById("txtTenHang").value;
    
   
    var txtTrangThai=document.getElementById("cboTrangThai").value;

    Save_HangXe([
            {name: 'TenHang', value: '' + txtTenHang + ''}
            ,{name: 'TrangThai', value: '' + txtTrangThai + ''}
        ]);
      Save_HangXe();
        
}
function New_HangXe_Click()
{
   New_HangXe();
}




function Delete_DoiXe_Click(blogid,msg)
{
    //alert(blogid);
    var x=confirm(msg);
    if(x===true)
        {
            Delete_DoiXe([{name: 'ID', value: '' + blogid + ''}]);
        }
}
function Update_DoiXe_Click(blogid)
{
   
   
    Update_DoiXe([{name: 'ID', value: '' + blogid + ''}]);
}
function Save_DoiXe_Click()
{
    
    
    var txtDoiXe= document.getElementById("txtDoiXe").value;
    var cboHangXeID= document.getElementById("cboHangXeID").value;
    
    var txtTrangThai=document.getElementById("cboTrangThai").value;
    
    Save_DoiXe([
            {name: 'TenHang', value: '' + txtDoiXe + ''}
            ,{name: 'TrangThai', value: '' + txtTrangThai + ''}
             ,{name: 'DoiXe', value: '' + txtDoiXe + ''}
            ,{name: 'HangXeID', value: '' + cboHangXeID + ''}
        ]);
      
        
}
function New_DoiXe_Click()
{
    var cboHangXeID=document.getElementById("cboHangXeID").value;
    New_DoiXe(
            [
            {name: 'HangXeID', value: '' + cboHangXeID + ''}
        ]
        );
}
function cboHangXeID_Change()
{
    var cboHangXeID=document.getElementById("cboHangXeID").value;
    HangXeChange_DoiXe(
            [
            {name: 'HangXeID', value: '' + cboHangXeID + ''}
        ]
        );
}